import request from '@/utils/request'

export function selectPage(data){
    return request({
        url: '/brands/findAll',
        method: 'post',
        data
    })
}

export function delById(id) {
    return request({
        url: `/brands/delById/${id}`,
        method: 'delete'
    })
}

export function save(data) {
    return request({
        url: '/brands/addBrand',
        method: 'post',
        data
    })
}

export function delBatch(data) {
    return request({
        url: '/brands/delBactch',
        method: 'post',
        data
    })
}

export function findOne(id) {
    return request({
        url: `/brands/findOne?id=${id}`,
        method: 'get',
    })
}
 

export function updateBrand(data) {
    return request({
        url: '/brands/updateBrand',
        method: 'post',
        data
    })
}

export function findAllBrand() {
    return request({
        url: `/brands/findAll`,
        method: 'get',
    })
}